/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package corejava;

import java.util.Date;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author HuynhNB
 */
public class CheckDuongLich {
    public static void main(String args[]){
        int _d = 1;
        int _m = 1;
        int _y = 1956;
        
        // convert to am lich
        String[] _can = {"Giap","At","Binh","Dinh","Mau","Ky","Canh","Tan","Nham","Quy"};
        String[] _chi ={"Ti","Suu","Dan","Mao","Thin","Ti","Ngo","Mui","Than","Dau","Tuan","Hoi"};
        System.out.println(_can[0]);
        System.out.println();
        int _canout = _y % _can.length;
        int _chiout = _y % _chi.length;
         System.out.println(_canout);
         System.out.println(_chiout);
         //Date _cd = new Date();
         LunisolarCalendar _cd = new LunisolarCalendar(_y, _m, _d);
         LunisolarCalendar _LunisolarCalendar1 = null;
         LunisolarCalendar _LunisolarCalendar2 = null;
        try {
            _LunisolarCalendar1 = LunisolarCalendar.solar2lunar(_cd);
            _LunisolarCalendar2 = LunisolarCalendar.lunar2solar(_cd);
        } catch (Exception ex) {
            Logger.getLogger(CheckDuongLich.class.getName()).log(Level.SEVERE, null, ex);
        }
         System.out.println(_LunisolarCalendar2.toString());
    }
    
}
